home *** CD-ROM | disk | FTP | other *** search
- Path: bcfreenet.seflin.lib.fl.us!bcfreenet!z007400b
- From: z007400b@bcfreenet.seflin.lib.fl.us (Ralph Silverman)
- Newsgroups: comp.lang.c
- Subject: Re: Segmentation fault at return statement. Can't figure out ....
- Date: 19 Jan 1996 18:47:36 GMT
- Organization: SEFLIN Free-Net - Broward
- Message-ID: <4dop08$kdi@bcfreenet.seflin.lib.fl.us>
- References: <4dm2n1$egk@murphy.servtech.com>
- NNTP-Posting-Host: bcfreenet.seflin.lib.fl.us
- X-Newsreader: TIN [version 1.2 PL2]
-
- Avijit Dasgupta (avi@servtech.com) wrote:
- : Hi all,
-
- : I am not being able to figure out why I get a segmentation fault in
- : a return stmt.
-
- : main.c:
-
- : main()
- : {
- : ..
- : ..
- : calls a function test() returning int
-
- : }
-
- : test.c:
-
- : test()
- : {
-
- : .
- : ..
- : .
- : 83: return(999); <----- Segmentation fault at this stmt.
- : }
-
- : Running dbx I get these error messages:
-
- : (dbx) where
- : => [1] test( ) at line 83
- : dbx: bad data address
- : dbx fetch at 0x697075a4 failed - I/O error
- : dbx : attempt to read stack failed - bad frame pointer
- : (dbx)
-
- : I can't figure out, bcoz this function gets called multiple times and
- : fails only after a fixed X times ... Any Help ?
-
-
- --
- ********begin r.s. response*********
-
- 'test'
- is likely to be
- a command of
- the
- operating system
- .
- 1) look it up.
- 2) rename yours.
-
-
- ********end r.s. response***********
- Ralph Silverman
- z007400b@bcfreenet.seflin.lib.fl.us
-
-